package com.woniu.service.command;

import com.woniu.util.ApplicationContextHolder;
import lombok.Data;

/**
 * @description:
 * @author: my
 * @time: 2021/5/11 16:20
 */
@Data
public class ChangeFundStatusCommand {
    private ChangeFundStatusCommandHandler handler;
    private Integer id;

    public ChangeFundStatusCommand(){
        this.handler =
                ApplicationContextHolder.getApplicationContext().getBean(ChangeFundStatusCommandHandler.class);
    }

    public ChangeFundStatusCommand(Integer id){
        this();
        this.id = id;
    }

    public void execute(){
        this.handler.action(this);
    }
}
